package org.isystem.autpart.beans;
// Generated 15-jun-2013 0:24:19 by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TModulo generated by hbm2java
 */
@Entity
@Table(name="T_MODULO"
    ,catalog="db_autpart"
)
public class TModulo  implements java.io.Serializable {


     private String id;
     private TModulo TModulo;
     private String denominacion;
     private String tipo;
     private String url;
     private Set TControlModulos = new HashSet(0);
     private Set TModulos = new HashSet(0);

    public TModulo() {
    }

	
    public TModulo(String id) {
        this.id = id;
    }
    public TModulo(String id, TModulo TModulo, String denominacion, String tipo, String url, Set TControlModulos, Set TModulos) {
       this.id = id;
       this.TModulo = TModulo;
       this.denominacion = denominacion;
       this.tipo = tipo;
       this.url = url;
       this.TControlModulos = TControlModulos;
       this.TModulos = TModulos;
    }
   
     @Id 
    
    @Column(name="ID", unique=true, nullable=false, length=20)
    public String getId() {
        return this.id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ID_SUBMODULO")
    public TModulo getTModulo() {
        return this.TModulo;
    }
    
    public void setTModulo(TModulo TModulo) {
        this.TModulo = TModulo;
    }
    
    @Column(name="DENOMINACION", length=20)
    public String getDenominacion() {
        return this.denominacion;
    }
    
    public void setDenominacion(String denominacion) {
        this.denominacion = denominacion;
    }
    
    @Column(name="TIPO", length=50)
    public String getTipo() {
        return this.tipo;
    }
    
    public void setTipo(String tipo) {
        this.tipo = tipo;
    }
    
    @Column(name="URL", length=65535)
    public String getUrl() {
        return this.url;
    }
    
    public void setUrl(String url) {
        this.url = url;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="TModulo")
    public Set getTControlModulos() {
        return this.TControlModulos;
    }
    
    public void setTControlModulos(Set TControlModulos) {
        this.TControlModulos = TControlModulos;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="TModulo")
    public Set getTModulos() {
        return this.TModulos;
    }
    
    public void setTModulos(Set TModulos) {
        this.TModulos = TModulos;
    }

    @Override
    public String toString() {
        return denominacion;
    }


}


